# -*- coding:utf-8 -*-

#导入单元测试包
import unittest

#导包
import HTMLTestRunner

#导入单元测试
from unit import login

#导入os
import os

import sys
reload(sys)
sys.setdefaultencoding("utf-8")

#实例化套件对象
suit = unittest.TestSuite()

#将单元测试加入到套件里面
suit.addTests(unittest.makeSuite(login.Login))

#获取当前路径
files = os.getcwd()+"/jd.html"

#指定读写方式
filename = open(files,'wb')

#运行单元测试
runner = HTMLTestRunner.HTMLTestRunner(stream=filename,title="jd",description="login")
runner.run(suit)